//
//  HSVideoListCell.m
//  HolyShit
//
//  Created by Robin on 2017/4/26.
//  Copyright © 2017年 HolyShit. All rights reserved.
//

#import "HSVideoListCell.h"

@interface HSVideoListCell ()

@property (nonatomic, strong) UIView  *bgView;
@property (nonatomic, strong) UIImageView *coverImgV;
@property (nonatomic, strong) UILabel *titleLb;
@property (nonatomic, strong) UILabel *rankLb;

@end

@implementation HSVideoListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self commonInit];
    }
    return self;
}

- (void)commonInit
{
    self.bgView = [UIView new];
    self.bgView.backgroundColor = WHITE_COLOR;
    
    [self addSubview:self.bgView];
    [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(10);
        make.right.mas_equalTo(-10);
    }];
    
    self.coverImgV = [[UIImageView alloc] initWithImageType:MYImageTypePic];
    [self.bgView addSubview:self.coverImgV];
    [self.coverImgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.mas_equalTo(0);
        make.width.mas_equalTo(120);
    }];
    
    self.titleLb = [UILabel labelWithFont:MYFont(Font30) color:HEXCOLOR(HSColorBlack)];
    self.titleLb.numberOfLines = 2;
    [self.bgView addSubview:self.titleLb];
    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.coverImgV.mas_right).offset(5);
        make.top.mas_equalTo(5);
        make.right.mas_equalTo(-5);
    }];
    
    self.rankLb = [UILabel labelWithFont:MYFont(Font32) color:HEXCOLOR(HSColorRed)];
    [self.bgView addSubview:self.rankLb];
    [self.rankLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-5);
        make.bottom.mas_equalTo(-5);
    }];
}

- (void)setModel:(HSVideoListModel *)model
{
    _model = model;
}


@end
